package com.maistars.spider.service.render.handler.impl;

import com.maistars.spider.common.util.HtmlUtil;
import com.maistars.spider.service.render.handler.HtmlHandler;

import java.util.Map;

/**
 * @author dhr
 * @date 2021/11/20 下午10:02
 */
public class DoubleSlashHtmlHandler extends HtmlHandler {

    public DoubleSlashHtmlHandler(Map<String, String> context) {
        super(context);
    }

    @Override
    public void invoke() {
        String html = HtmlUtil.handleLinkSingleAndDoubleSlash(context.get("handledHtml"),context.get("orignalUrl"));
        context.put("handledHtml",html);
    }
}
